﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Web.Api.Server.Models
{
    [Table(Name = "goods_categories")]
    public class GoodsCategory
    {
        [Column(Name = "id", IsIdentity = true)]
        public int Id { get; set; }

        [Column(Name = "name", StringLength = 255)]
        public string Name { get; set; }

        [Column(Name = "index")]
        public int Index { get; set; } = 0;

        [Column(Name = "remark", StringLength = 255, IsNullable = true)]
        public string Remark { get; set; }

        [Column(Name = "shop_id")]
        public int ShopId { get; set; }

        [Column(Name = "created_at", IsNullable = true)]
        public DateTime? CreatedAt { get; set; } = DateTime.Now;

        [Column(Name = "updated_at", IsNullable = true)]
        public DateTime? UpdatedAt { get; set; } = DateTime.Now;
    }
}
